﻿using System.Collections.Generic;
using UnityEngine;

public class KeyPanel:MonoBehaviour
{
    public List<InteractivelyButton> buttons;

    public void ShowKeys(List<QTEKey> keys = null)
    {
        for (int i = 0; i < buttons.Count; i++)
        {
            var button = buttons[i];
            if(keys != null && i < keys.Count)
            {
                button.Show(keys[i].Text);
                button.SetNormal();
                button.gameObject.SetActive(true);
            }
            else
            {
                button.gameObject.SetActive(false);
            }
        }
    }

    public void ShowPressed(int index)
    {
        buttons[index].SetPressed();
    }
}
